package com.diandian.backend.dingding.data.param;

import com.diandian.backend.dingding.data.dto.DingdingDeptTreeQueryParamDTO;
import com.diandian.base.boot.starter.exception.DefaultException;

import java.io.Serializable;

public class DingdingDeptTreeQueryParam implements Serializable {

	private String belong;
	private String deptNodeCode;
	private String orgId;
	private String orgCode;

	public void check(){
		if(this.belong == null || "".equals(this.belong)){
			throw new DefaultException("归属标识不能为空");
		}
	}

	public DingdingDeptTreeQueryParamDTO toDTO(){
		DingdingDeptTreeQueryParamDTO dto = new DingdingDeptTreeQueryParamDTO();
		dto.setBelong(this.belong);
		dto.setOrgId(this.orgId);
		dto.setOrgCode(this.orgCode);
		dto.setDeptNodeCode(this.deptNodeCode);
		return dto;
	}

	public String getBelong() {
		return belong;
	}

	public void setBelong(String belong) {
		this.belong = belong;
	}

	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getDeptNodeCode() {
		return deptNodeCode;
	}

	public void setDeptNodeCode(String deptNodeCode) {
		this.deptNodeCode = deptNodeCode;
	}
}
